const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();

async function updateProductMinimumStock() {
  try {
    const product = await prisma.product.update({
      where: { id: 11 },
      data: {
        minimumStock: 5,
        stockStatus: 'warning'
      }
    });
    console.log('产品最低库存预警值设置成功:', product);
  } catch (error) {
    console.error('设置最低库存预警值失败:', error);
  } finally {
    await prisma.$disconnect();
  }
}

updateProductMinimumStock(); 